package com.leinao;

import java.io.IOException;
import java.sql.SQLException;
import java.text.ParseException;

import com.leinao.builder.BeanBuilder;
import com.leinao.builder.ServiceBuilder;
import com.leinao.config.impl.MysqlConfig;

import freemarker.template.MalformedTemplateNameException;
import freemarker.template.TemplateException;
import freemarker.template.TemplateNotFoundException;

/**
*
* CRUD 基础类生成器
* created by wangshoufa
* 2018年3月08日 下午10:10:41
*
*/
public class CRUDBeanApp {
	public static void main(String[] args) throws TemplateNotFoundException, MalformedTemplateNameException,
			ParseException, IOException, TemplateException, SQLException {
		MysqlConfig conf = new MysqlConfig("jdbc:mysql://localhost:3306/crm", "root", "");
		BeanBuilder builder = new BeanBuilder(conf, "src/main/java/com/leinao", "com.leinao", "_");// 生成bean
		ServiceBuilder builder2 = new ServiceBuilder(conf, "src/main/java/com/leinao", "com.leinao", "_");// 默认使用一个主键的类型进行封装
		builder.build();
		builder2.build();
	}
}
